Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/crit app frame #219

Closed
wants to merge 63 commits into from
Closed

Feature/crit app frame #219

wants to merge 63 commits into from

Conversation

davivcu
Copy link
Collaborator

@davivcu davivcu commented Sep 19, 2023

This branch populated the three sections of the Apparatus-Sources-Analogues frame.
Parsing of sources and analogues attributes can be custumized in new keys inside edition_config.json.

The aspect of sources and analogues elements in the text flow can be configured in editorial_conventions_config.json.
Since sources and analogues refer to different markups, said customization will use the dot notation to clarify that we are styling a group of elements '.analogues' and '.sources', and not the single elements quote/cit/div/ref/seg/p/l... that can be recognized as such (example at the end of the post).
Default values for this editorial configuration joined the similar defaults inside editorial-conventions-service.ts.

The highlight color for click and hover events on the sources and analogues is taken from existing values edition.readingColorDark and edition.readingColorHight key in edition_config.json.
In order to apply them, this branch uses a new small function that can be extended in the future to load generic CSS written by the users.

Both analogue entry and source entry components use the existing evt-content-viewer component in order to display their nested elements both in the text flow and in their frame.
In the case of self-closed elements such as PTR or empty elements, the source or analogue element will be displayed as a note/exponent in the text flow.

New features:

  • Analogues (list) component in order to list and manage the existing apparatus on the current page.
  • Source-entry and source-detail component
  • Analogue-entry and analogue-detail component
  • Sources list component and analogues (list) component.

Managing Sources and Analogues classes required setting up the parsing and models of various elements:

  • BIBL, LISTBIBL, BIBLSTRUCT, and their components
  • QUOTE, CIT
  • REF, SEG

Added few utilities in dom-utils and xml-utils.

Changes to existing features:

Elements modified for @source (customizable in config) attribute recognition and relative elements retrieving:

  • DIV, P, L, LG both parsing and their component
  • NOTE, PTR parsing only

Added correct type referral in MsDescParser for new BiblList, Bibl, and Quote types.

A json you may use to test editorial conventions for analogues and sources:

 { 
    "quotations": {
        "markup": {
            "element": ".sources"
        },
        "layouts": {
            "diplomatic": {
                "style": {
                    "font-style": "italic",
                    "background-color":"red"
                }
            },
            "critical": {
                "style": {
                    "font-style": "italic",
                    "background-color":"green"
                }
            },
            "interpretative": {
                "style": {
                    "font-style": "italic",
                    "background-color":"blue"
                }
            }
        }
    },
    "analogues": {
        "markup": {
            "element": ".analogues"
        },
        "layouts": {
            "diplomatic": {
                "style": {
                    "text-decoration": "underline dotted from-font",
                }
            },
            "interpretative": {
        	"pre": '>',
               "style": {
                    "font-style": "italic",
                    "text-decoration": "underline dotted from-font",
                }
            },
            "critical": {
        	 "pre": 'ANG: ',
                "style": {
                    "text-decoration": "underline dotted from-font",
                }
            }
        }
    }
 }

davivcu added 30 commits June 8, 2023 19:21
davivcu and others added 26 commits August 25, 2023 16:02
…component, rationalized collecting of sources and linked elements
…rame

# Conflicts:
#	src/app/services/editorial-conventions.service.ts
@davivcu davivcu marked this pull request as ready for review September 19, 2023 17:50
@davivcu davivcu closed this Oct 17, 2023
@davivcu
Copy link
Collaborator Author

davivcu commented Oct 17, 2023

Replaced with PR #220

@davivcu davivcu deleted the feature/crit_app_frame branch January 2, 2024 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants